package Dynamic_Program;
//动态规划斐波那契序列


public class Fibonacci {
    public static long solution(int N){
        long arr[] = new long[N+2];
        if(N<1){
            return 1;
        }
        arr[0] = 1;
        arr[1] = 1;

        for(int i=2;i<=N;i++){
            arr[i] = arr[i-1] + arr[i-2];
        }

        return arr[N];
    }
}
